menu channel {
~Profile Kicker Dialog~:/dialog -m prokick prokick
}

dialog ProKick {
  title "...:: Hybrid Profile Kicker ::..."
  size -1 -1 207 103
  option dbu
  icon Pictures\Msn.ico, 0
  box "Profile/s to kick:", 1, 1 1 81 84
  check "No Profile", 2, 23 10 55 10, left
  icon 3, 10 9 9 9, Pictures\np.bmp, 0
  icon 4, 10 19 9 9, Pictures\rp.bmp, 0
  check "Reg Profile", 5, 23 20 55 10, left
  icon 6, 10 29 9 9, Pictures\prp.bmp, 0
  check "Reg+Pic Profile", 7, 23 30 55 10, left
  icon 8, 10 39 9 9, Pictures\mp.bmp, 0
  check "Male Profile", 9, 23 40 55 10, left
  icon 10, 10 49 9 9, Pictures\pmp.bmp, 0
  check "Male+Pic Profile", 11, 23 50 55 10, left
  icon 12, 10 59 9 9, Pictures\fp.bmp, 0
  check "Female Profile", 13, 23 60 55 10, left
  icon 14, 10 69 9 9, Pictures\pfp.bmp, 0
  check "Female+Pic Profile", 15, 23 70 55 10, left
  button "Ok", 16, 79 89 25 10, flat ok
  button "Help", 17, 182 89 20 10, flat
  edit %nprofmsg, 18, 84 10 120 10, autohs
  edit %rprofmsg, 19, 84 20 120 10, autohs
  edit %rpicmsg, 20, 84 30 120 10, autohs
  edit %rpprofmsg, 21, 84 40 120 10, autohs
  edit %mpprofmsg, 22, 84 50 120 10, autohs
  edit %fprofmsg, 23, 84 60 120 10, autohs
  edit %fpprofmsg, 24, 84 70 120 10, autohs
  box "Message for kick:", 25, 81 1 125 84
  check "Kick with Ban", 26, 4 89 50 10, left
  button "Cancel", 27, 108 89 25 10, flat cancel
}


On *:Dialog:prokick:init:*: {
  if (%nprofmsg == $null) { set %nprofmsg Please come back when you have a profile | did -a prokick 18 %nprofmsg }
  if (%rprofmsg == $null) { set %rprofmsg Please come back when you have a gender | did -a prokick 19 %rprofmsg }
  if (%rpicmsg == $null) { set %rpicmsg Please come back when you have a gender | did -a prokick 20 %rpicmsg }
  if (%rpprofmsg == $null) { set %rpprofmsg No males allow in this room | did -a prokick 21 %rpprofmsg }
  if (%mpprofmsg == $null) { set %mpprofmsg No males allowed in this room | did -a prokick 22 %mpprofmsg }
  if (%fprofmsg == $null) { set %fprofmsg No females allowed in this room | did -a prokick 23 %fprofmsg }
  if (%fpprofmsg == $null) { set %fpprofmsg No females allowed in this room | did -a prokick 24 %fpprofmsg }
  if (%nprof == 1) { did -c prokick 2 }
  if (%rprof == 1) { did -c prokick 5 }
  if (%rpic == 1) { did -c prokick 7 }
  if (%rpprof == 1) { did -c prokick 9 }
  if (%mpprof == 1) { did -c prokick 11 }
  if (%fprof == 1) { did -c prokick 13 }
  if (%fpprof == 1) { did -c prokick 15 }
  if (%kickban == 1) { did -c prokick 26 }
}

On *:Dialog:prokick:sclick:26:{ if ($did(26).state == 1) { .enable #withban | .disable #justkick }
  else { .enable #justkick | .disable #withban }
}
On *:Dialog:prokick:sclick:16: {
  set %nprof $did(2).state | set %nprofmsg $did(18)
  set %rprof $did(5).state | set %rprofmsg $did(19)
  set %rpic $did(7).state | set %rpicmsg $did(20)
  set %rpprof $did(9).state | set %rpprofmsg $did(21)
  set %mpprof $did(11).state | set %mpprofmsg $did(22)
  set %fprof $did(13).state | set %fprofmsg $did(23)
  set %fpprof $did(15).state | set %fpprofmsg $did(24)
  set %kickban $did(26).state
}
On *:Dialog:prokick:sclick:17:{ dialog -m prohlp prohlp }

on *:JOIN:* {
  if ($nick != $me) { PROP $nick MSNPROFILE }
}

#justkick on
raw 818:*: {
  if ($3 == MSNPROFILE) {
    if (%nprof == 1) && ($4 == 0) { /kick $active $2 %nprofmsg | halt }
    elseif (%rprof == 1) && ($4 == 1) { /kick $active $2 %rprofmsg | halt }
    elseif (%rpic == 1) && ($4 == 9) { /kick $active $2 %rpicmsg | halt }
    elseif (%rpprof == 1) && ($4 == 3) { /kick $active $2 %rpprofmsg | halt }
    elseif (%mpprof == 1) && ($4 == 11) { /kick $active $2 %mpprofmsg | halt }
    elseif (%fprof == 1) && ($4 == 5) { /kick $active $2 %fprofmsg | halt }
    elseif (%fpprof == 1) && ($4 == 13) { /kick $active $2 %fpprofmsg | halt }
  }
}
#justkick end

#withban off
raw 818:*: {
  if ($3 == MSNPROFILE) {
    if (%nprof == 1) && ($4 == 0) { access $active add DENY *! $+ $$ial($2 $+ *,1).addr 60 : No Profile | kick $active $2 %nprofmsg (Access ban set for 1 Hour) | halt }
    elseif (%rprof == 1) && ($4 == 1) { access $active add DENY *! $+ $$ial($2 $+ *,1).addr 60 : Reg Profile | kick $active $2 %rprofmsg (Access ban set for 1 Hour) | halt }
    elseif (%rpic == 1) && ($4 == 9) { access $active add DENY *! $+ $$ial($2 $+ *,1).addr 60 : Reg+Pic Profile | kick $active $2 %rpicmsg (Access ban set for 1 Hour) | halt }
    elseif (%rpprof == 1) && ($4 == 3) { access $active add DENY *! $+ $$ial($2 $+ *,1).addr 60 : Male Profile | kick $active $2 %rpprofmsg (Access ban set for 1 Hour) | halt }
    elseif (%mpprof == 1) && ($4 == 11) { access $active add DENY *! $+ $$ial($2 $+ *,1).addr 60 : Male+Pic Profile | kick $active $2 %mpprofmsg (Access ban set for 1 Hour) | halt }
    elseif (%fprof == 1) && ($4 == 5) { access $active add DENY *! $+ $$ial($2 $+ *,1).addr 60 : Female Profile | kick $active $2 %fprofmsg (Access ban set for 1 Hour) | halt }
    elseif (%fpprof == 1) && ($4 == 13) { access $active add DENY *! $+ $$ial($2 $+ *,1).addr 60 : Female+Pic Profile | kick $active $2 %fpprofmsg (Access ban set for 1 Hour) | halt }
  }
}
#withban end

dialog prohlp {
  title "Help"
  size -1 -1 121 92
  option dbu
  icon Pictures\Msn.ico, 0
  button "Close", 1, 48 80 25 10, flat ok cancel
  box "OnJoin Profile kicker help:", 2, 1 0 119 79
  text "This addon works by checking all joiner for there Profile status.", 3, 3 8 115 14
  text "Just select the profile or profile's you wish to not allow and kick from your room.  You can select any number of profile/s to check and kick on.", 4, 3 22 115 27
  text "You can also choose to ban as well as kick, this ban is set at a default 1 hour. The reason is stored in the ban so can be viewed and deleted easier.", 5, 3 49 115 29
}
